package com.zygh.interactiveplatform.module.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.zygh.interactiveplatform.common.constant.EmployeeResponseCodeConst;
import com.zygh.interactiveplatform.common.domain.ResponseDTO;
import com.zygh.interactiveplatform.module.entity.LogTrend;
import com.zygh.interactiveplatform.module.entity.StorageTrends;
import com.zygh.interactiveplatform.module.mapper.LogTrendMapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 * 服务实现类
 * </p>
 *
 * @author lee
 * @since 2021-02-02
 */
@Service
public class LogTrendService extends ServiceImpl<LogTrendMapper, LogTrend> {
    @Resource
    private LogTrendMapper logTrendMapper;

    public ResponseDTO findLogTrendAllDay() {
        List<LogTrend> logTrendAllDay = logTrendMapper.findLogTrendAllDay();
        if (logTrendAllDay != null) {
            return ResponseDTO.succData(logTrendAllDay);
        }
        return ResponseDTO.wrap(EmployeeResponseCodeConst.EMPTY_INFORMATION_ERROR);
    }
}
